﻿using CleanArchitecture.Infrastructure.Interfaces;

namespace CleanArchitecture.Infrastructure.Entities.Settings
{
    /// <summary>
    /// Customer settings
    /// </summary>
    public class CustomerSettings : ISettings
    {
        //private EntityEnumConfig.PasswordFormat _format;
        /// <summary>
        /// Gets or sets a value indicating whether username will be validated using regex (when registering or changing on the 'My Account' page)
        /// </summary>
        public bool UserLoginnameValidationUseRegex { get; set; }

        /// <summary>
        /// Gets or sets a username validation rule
        /// e.g ^[a-zA-Z][a-zA-Z0-9]{3,9}$  
        /// means : usernames are not allowed to start with digits and min/max length restrictions
        /// </summary>
        public string UserLoginnameValidationRule { get; set; }

        /// <summary>
        /// Default password format for adminuser , hashed/encrypt
        /// </summary>
        public int DefaultPasswordFormat { get; set; }

        /// <summary>
        /// Gets or sets a customer password format (SHA1, MD5) when passwords are hashed (DO NOT edit in production environment)
        /// </summary>
        public string HashedPasswordFormat { get; set; }

        /// <summary>
        /// Gets or sets a minimum password length  默认为6最少位数密码
        /// </summary>
        public int? PasswordMinLength { get; set; }

        /// <summary>
        /// Gets or sets DavidLee 用户登录系统是否记录日志
        /// </summary>
        public bool LogCustomerLoggedEvent { get; set; }

        /// <summary>
        /// Gets or sets a max password length  默认为15最多位数密码
        /// </summary>
        public int PasswordMaxLength { get; set; }

        /// <summary>
        /// Gets or sets maximum login failures to lockout account. Set 0 to disable this feature
        /// </summary>
        public int FailedPasswordAllowedAttempts { get; set; }
               
    }
}